###############################################
# Xenomorph Species Rights - Purge Types
# Place in: common/species_rights/purge_types/xenomorph_species_rights_purge_types.txt
###############################################

# Standard Rapid Necrophage
# Default Xeno purge. Converts purged pops into Xenomorph pops via xeno_necrophage.1.
purge_xenomorph_rapid_necrophage = {
	pop_escape_chance = 0.00
	pop_decline_rate = 250

	pop_group_modifier = {
		pop_happiness = -10
		pop_political_power = -1.00
	}

	potential = {
		exists = from
		from = { is_xenomorph_empire = yes }
	}

	allow = {
		hidden_trigger = { exists = from }
		is_sapient = yes
		NOT = { is_same_species = from }
		NOR = {
			has_trait = trait_mechanical
			has_trait = trait_machine_unit
			has_trait = trait_necrophage
		}
		custom_tooltip = {
			fail_text = PURGES_ALLOWED
			from = {
				OR = {
					has_ethic = ethic_gestalt_consciousness
					has_policy_flag = purge_allowed
					is_xenomorph_empire = yes
				}
			}
		}
	}

	ai_will_do = {
		factor = 100
	}
}

# Selective Matriarchal Necrophage
# Pass 15: redesigned to kill pops until empire-wide species count drops below
# 1000, then convert survivors to Breeding Stock with all-male trait and
# feminine traits stripped. Available only with Matriarchs' Hunger civic.
purge_xenomorph_selective_matriarchal = {
	pop_escape_chance = 0.00
	pop_decline_rate = 200

	pop_group_modifier = {
		pop_happiness = -10
		pop_political_power = -1.00
	}

	potential = {
		exists = from
		from = {
			is_xenomorph_empire = yes
			has_valid_civic = civic_xenomorph_matriarchs_hunger
		}
	}

	allow = {
		hidden_trigger = { exists = from }
		is_sapient = yes
		NOT = { is_same_species = from }
		NOR = {
			has_trait = trait_mechanical
			has_trait = trait_machine_unit
			has_trait = trait_necrophage
		}
	}

	ai_will_do = {
		factor = 100
	}
}

# Selective Patriarchal Necrophage
# Pass 15: mirror of selective_matriarchal. Strips masculine traits, adds
# trait_lv_all_female, converts survivors to Breeding Stock.
purge_xenomorph_selective_patriarchal = {
	pop_escape_chance = 0.00
	pop_decline_rate = 200

	pop_group_modifier = {
		pop_happiness = -10
		pop_political_power = -1.00
	}

	potential = {
		exists = from
		from = {
			is_xenomorph_empire = yes
			has_valid_civic = civic_xenomorph_patriarchs_dominion
		}
	}

	allow = {
		hidden_trigger = { exists = from }
		is_sapient = yes
		NOT = { is_same_species = from }
		NOR = {
			has_trait = trait_mechanical
			has_trait = trait_machine_unit
			has_trait = trait_necrophage
		}
	}

	ai_will_do = {
		factor = 100
	}
}
